/**
 * 右侧导航
 */
define(function (require) {
    'use strict';
    require('/static_public/js/token');
    var $ = require('jquery');
    var NavManager = require('/static_public/public_menu/navManager');

    return {
        init: function () {
            new NavManager($('#nav'), [
                {
                    'id': 'menu_home',
                    'code': '',
                    'name': '首页',
                    'level': 1,
                    'iconCls': 'icon-home',
                    'url': ['/page/home/home.shtml'],
                    'children': null
                },
                {
                    'id': 'menu_building',
                    'code': '500301',
                    'name': '楼盘项目',
                    'level': 1,
                    'iconCls': 'icon-building',
                    'url': ['/page/houses_project/houses_project.shtml'],
                    'children': null
                },
                {
                    'id': 'menu_ditch_run',
                    'code': '',
                    'name': '渠道运营',
                    'level': 1,
                    'iconCls': 'icon-ditch',
                    'url': '',
                    'cls':'icon-fav',
                    'children': [
                        {
                            'id': 'menu_ditch_run_1',
                            'code': '50030601',
                            'name': '经纪人管理',
                            'level': 2,
                            'url': ['/page/intermediary_organ/broker.shtml']
                        },
                        {
                            'id': 'menu_ditch_run_2',
                            'code': '50030607',
                            'name': '中介机构',
                            'level': 2,
                            'url': [
                                '/page/intermediary_organ/',
                                '/page/intermediary_organ/index.shtml'
                            ]
                        },
                        {
                            'id': 'menu_ditch_run_3',
                            'code': '500804',
                            'name': '小蜜蜂',
                            'level': 2,
                            'url': ['/page/intermediary_organ/bee/index.shtml','/page/intermediary_organ/bee/activity/edit.html?pid={placeholder_}&id={placeholder_}','/page/intermediary_organ/bee/activity/view.html?pid={placeholder_}&id={placeholder_}']
                        },
                        {
                            'id': 'menu_ditch_run_4',
                            'code': '50030606',
                            'name': '下线经纪人',
                            'level': 2,
                            'url': ['/page/intermediary_organ/invitation_broker.shtml']
                        },
                        {
                            'id': 'menu_ditch_run_5',
                            'code': '50032101',
                            'name': '第三方渠道',
                            'level': 2,
                            'url': ['/page/third_channel/list.shtml','/page/third_channel/detail.shtml?channelId={placeholder_}&expand={placeholder_}']
                        },
                        {
                            'id': 'menu_ditch_manage_7',
                            'code': '50032206',
                            'name': '二维码渠道',
                            'level': 2,
                            'url': ['/page/ditch/source.shtml']
                        },
                        {
                            'id': 'menu_ditch_run_6',
                            'code': '503001',
                            'name': '云call客',
                            'level': 2,
                            'url': ['/page/wangcaibao/call_manage.shtml']
                        }
                    ]
                },
                {
                    'id': 'menu_ditch_manage',
                    'code': '',
                    'name': '渠道管理',
                    'level': 1,
                    'iconCls': 'icon-ditchManage',
                    'url': '',
                    'cls':'icon-fav',
                    'children': [
                        {
                            'id': 'menu_ditch_manage_5',
                            'code': '500701',
                            'name': '规则管理',
                            'level': 2,
                            'target': '_blank',
                            'url': ['/page/ditch/index.shtml?code=ruleSet']
                        },
                        {
                            'id': 'menu_ditch_manage_6',
                            'code': '500702',
                            'name': '判客分配',
                            'level': 2,
                            'target': '_blank',
                            'url': ['/page/ditch/index.shtml?code=guestAllot']
                        },
                        {
                            'id': 'menu_ditch_manage_3',
                            'code': '50030608',
                            'name': '客户管理',
                            'level': 2,
                            'url': ['/page/customer_management/customer_management.shtml']
                        },
                        {
                            'id': 'menu_ditch_manage_4',
                            'code': '50032202',
                            'name': '申诉处理',
                            'level': 2,
                            'url': ['/page/customer_management/complaint_management.shtml']
                        },
                        {
                            'id': 'menu_ditch_manage_8',
                            'code' : '50032207',
                            'name': '游戏规则',
                            'level': 2,
                            'url': ['/page/game_rules/game_rules.shtml']
                        }
                    ]
                },
                {
                    'id': 'menu_commission',
                    'code': '50030605',
                    'name': '佣金管理',
                    'level': 1,
                    'iconCls': 'icon-commission',
                    'url': '',
                    'cls':'icon-fav',
                    'children': [
                        {
                            'id': 'menu_commission_1',
                            'code': '50030605',
                            'name': '个人佣金',
                            'level': 2,
                            'url': ['/page/brokerage/index.shtml']
                        },
                        {
                            'id': 'menu_commission_2',
                            'code': '50030605',
                            'name': '邀请奖励',
                            'level': 2,
                            'url': ['/page/encouragement/index.shtml']
                        },
                        {
                            'id': 'menu_commission_3',
                            'code': '50030605',
                            'name': '机构佣金',
                            'level': 2,
                            'url': ['/page/brokerage/agency.shtml']
                        },
                        {
                            'id': 'menu_commission_4',
                            'code': '50030605',
                            'name': '异常佣金',
                            'level': 2,
                            'url': ['/page/brokerage/unusual.shtml']
                        }
                    ]
                },
                {
                    'id': 'menu_data',
                    'code': '500307',
                    'name': '数据中心',
                    'level': 1,
                    'iconCls': 'icon-data',
                    'url': '',
                    'cls':'icon-fav',
                    'children': [
                        {
                            'id': 'menu_data_1',
                            'code': '50030705',
                            'name': '经纪人新增表',
                            'level': 2,
                            'url': ['/page/reports/broker-increase.shtml']
                        },
                        {
                            'id': 'menu_data_2',
                            'code': '50030706',
                            'name': '渠道效果分析表',
                            'level': 2,
                            'url': ['/page/reports/channel-effect.shtml']
                        },
                        {
                            'id': 'menu_data_3',
                            'code': '50030702',
                            'name': '客户推荐转化表',
                            'level': 2,
                            'url': ['/page/reports/customer-conversion.shtml']
                        },
                        {
                            'id': 'menu_data_4',
                            'code': '50030703',
                            'name': '成交统计表',
                            'level': 2,
                            'url': ['/page/reports/deal-statistics.shtml']
                        },
                        {
                            'id': 'menu_data_6',
                            'code': '50030708',
                            'name': '下线经纪人',
                            'level': 2,
                            'url': ['/page/reports/invite-broker.shtml']
                        },
                        {
                            'id': 'menu_021_1',
                            'code': '50030711',
                            'name': '粉丝数据',
                            'level': 2,
                            'url': ['/page/maintenance/fans-analyse.shtml']
                        }
                    ]
                },
                {
                    'id': 'menu_finance',
                    'code': '',
                    'name': '财务中心',
                    'level': 1,
                    'iconCls': 'icon-finance',
                    'url': '',
                    'cls':'icon-fav',
                    'children': [
                        {
                            'id': 'menu_finance_1',
                            'code': '50031101',
                            'name': '收支对账',
                            'level': 2,
                            'url': ['/page/finance/accounts.shtml']
                        },
                        {
                            'id': 'menu_finance_2',
                            'code': '50031102',
                            'name': '委托代付',
                            'level': 2,
                            'url': ['/page/finance/entrust-pay/index.shtml']
                        }
                    ]
                },
                {
                    'id': 'menu_set',
                    'code': '',
                    'name': '基础配置',
                    'level': 1,
                    'iconCls': 'icon-set',
                    'url': '',
                    'cls':'icon-fav',
                    'children': [
                        {
                            'id': 'menu_set_1',
                            'code': '500309',
                            'name': '内容配置',
                            'level': 2,
                            'url': ['/page/config/content/kfs-setting.shtml', '/page/config/content/building_setting.shtml?proj_id={placeholder_}', '/page/config/content/style-setting.shtml', '/page/config/content/city-mng.shtml',
                                '/page/config/content/knowledge_mng.shtml']
                        },
                        {
                            'id': 'menu_set_2',
                            'code': '500302',
                            'name': '参数设置',
                            'level': 2,
                            'url': [
                                '/page/parameter_settings/public.shtml',
                                '/page/parameter_settings/project.shtml'
                            ]
                        },
                        {
                            'id': 'menu_set_5',
                            'code': '50030802',
                            'name': '定制页面',
                            'level': 2,
                            'url': ['/page/custom-page/index.shtml']
                        }
                    ]
                }

            ]);
        }
    };
});
